package com.mz361.modules.system.repository;

import com.mz361.modules.system.domain.ProductPackage;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author liaomch
 * @ date 2024/05/07
 */
public interface ProductPackageRepository extends BaseRepository<ProductPackage, Long> {

    List<ProductPackage> findAllByProduct_id(Long productId);

    @Query(value = "from ProductPackage o where o.package_id=?1")
    ProductPackage findByPackageId(Long packgeId);
}